import   {defineStore}  from  'pinia'


export const useloginUserStore = defineStore('loginUserInfo',{
    persist: {
        enabled: true,
        strategies: [
            {
                key: 'userLoginState',
                storage: localStorage,
            }
        ]
    },

    state: () => ({
        "user_id": "",
        "username": "",
        "email": "",
        "avatar_url":"",
        "saTokenInfo": {
            "tokenName": "",
            "tokenValue": "",
            "isLogin": false,
            "loginId": "",
            "loginType": "",
            "tokenTimeout": -1,
            "sessionTimeout":-1 ,
            "tokenSessionTimeout": -1,
            "tokenActiveTimeout": -1,
            "loginDeviceType": "DEF",
            "tag": null
        }
    }),
    actions: {
        // 退出登录方法
        logout() {
            this.loginId = ''
            this.userName = ''
        }
    },
    mutations:{

    }
});

export default{

    data:function() {
        return{}
    },
    methods:{},


}